package com.zhuchaooasystem.api;


import com.zhuchaooasystem.entity.ChangePWEntity;
import com.zhuchaooasystem.entity.ClientEntity;
import com.zhuchaooasystem.entity.DailyEntity;
import com.zhuchaooasystem.entity.FinishServiceEntity;
import com.zhuchaooasystem.entity.InformMessageEntity;
import com.zhuchaooasystem.entity.OrderDetailEntity;
import com.zhuchaooasystem.entity.OrderStateEntity;
import com.zhuchaooasystem.entity.OrderTrackEntity;
import com.zhuchaooasystem.entity.RecordDetailEntity;
import com.zhuchaooasystem.entity.RecordEntity;
import com.zhuchaooasystem.entity.ServiceDetailEntity;
import com.zhuchaooasystem.entity.ServiceEntity;
import com.zhuchaooasystem.entity.ServiceImageDeleteEntity;
import com.zhuchaooasystem.entity.ServiceImageEntity;
import com.zhuchaooasystem.entity.ServiceMessageEntity;
import com.zhuchaooasystem.entity.ServicePeopleEntity;
import com.zhuchaooasystem.entity.ServiceProgressEntity;
import com.zhuchaooasystem.entity.ServiceRedactAlterEntity;
import com.zhuchaooasystem.entity.ServiceSignEntity;
import com.zhuchaooasystem.entity.ServiceUnusualEntity;
import com.zhuchaooasystem.entity.SignListEntity;
import com.zhuchaooasystem.entity.SignNowEntity;
import com.zhuchaooasystem.entity.SignNumEntity;
import com.zhuchaooasystem.entity.SignTrailEntity;
import com.zhuchaooasystem.entity.TagInformMessageEntity;
import com.zhuchaooasystem.entity.TagServiceMessageEntity;
import com.zhuchaooasystem.entity.UnusualDeleteEntity;
import com.zhuchaooasystem.entity.UnusualDetailEntity;
import com.zhuchaooasystem.entity.UserEntity;

import java.util.Map;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;


/**
 *
 */
public interface HttpApi {

    /**
     * 登录接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("OAS/UserMultipleLogin")
    rx.Observable<UserEntity> loginApi(@FieldMap Map<String, String> map);

    /**
     * 版本更新接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("OAS/UpdateInterfaceByOA")
    rx.Observable<ClientEntity> updateInterfaceByOA(@FieldMap Map<String, String> map);

    /**
     * 下载apk
     *
     * @param
     * @return
     */
    @GET("/download/zhuchaoOA.apk")
    Call<ResponseBody> retrofitDownload();

    /**
     * 获取打卡次数接口
     *
     * @return
     */
    @FormUrlEncoded
    @POST("OAS/GetPunchCardsInfo")
    rx.Observable<SignNumEntity> getPunchCardsInfo(@FieldMap Map<String, String> map);

    /**
     * 获取打卡记录
     *
     * @return
     */
    @FormUrlEncoded
    @POST("OAS/AttHisToryList")
    rx.Observable<SignListEntity> attHisToryList(@FieldMap Map<String, String> map);

    /**
     * 打卡
     *
     * @return
     */
    @FormUrlEncoded
    @POST("OAS/PunchRecords")
    rx.Observable<SignNowEntity> punchRecords(@FieldMap Map<String, String> map);

    /**
     * 打卡轨迹
     *
     * @return
     */
    @FormUrlEncoded
    @POST("OAS/DrawUserLineInfo")
    rx.Observable<SignTrailEntity> drawUserLineInfo(@FieldMap Map<String, String> map);

    /**
     * 获取录音文件
     *
     * @return
     */
    @FormUrlEncoded
    @POST("OAS/getPronunciaTionList")
    rx.Observable<RecordEntity> getPronunciaTionList(@FieldMap Map<String, String> map);

    /**
     * 获取录音文件详情
     *
     * @return
     */
    @FormUrlEncoded
    @POST("OAS/GetAudionDetailInfo")
    rx.Observable<RecordDetailEntity> getAudionDetailInfo(@FieldMap Map<String, String> map);

    /**
     * 获取日报列表
     *
     * @return
     */
    @FormUrlEncoded
    @POST("OAS/GetWorkDayListInfo")
    rx.Observable<DailyEntity> getWorkDayListInfo(@FieldMap Map<String, String> map);

    /**
     * 提交日报
     */
    String submitWorkDay = "OAS/SubmitWorkDay";

    /**
     * 提交录音
     */
    String submitPronunciation = "OAS/SubmitPronunciation";


    /**
     * 请求服务列表
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("ProductService/OrderService_Table")
    rx.Observable<ServiceEntity> getService(@FieldMap Map<String, String> map);

    /**
     * 获取订单状态
     *
     * @return
     */
    @GET("ProductService/GetService_orderStaus")
    rx.Observable<OrderStateEntity> getOrderState();

    /**
     * 获取服务详情
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("ProductService/OrderService_Detaile")
    rx.Observable<ServiceDetailEntity> getServiceDetail(@FieldMap Map<String, String> map);

    /**
     * 获取服务详情---签到
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("ProductService/OrderService_Detaile")
    rx.Observable<OrderStateEntity> getServiceCardsInfo(@FieldMap Map<String, String> map);

    /**
     * 获取服务详情---签到
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("ProductService/AccomplishServiceFlow")
    rx.Observable<FinishServiceEntity> accomplishServiceFlow(@FieldMap Map<String, String> map);


    /**
     * 服务打卡
     *
     * @return
     */
    @FormUrlEncoded
    @POST("ProductService/GetService_orderPushCards")
    rx.Observable<ServiceSignEntity> getService_orderPushCards(@FieldMap Map<String, String> map);

    /**
     * 获服务明细
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("ProductService/SearchProgressMade")
    rx.Observable<ServiceProgressEntity> getServiceProgress(@FieldMap Map<String, String> map);

    /**
     * 编辑服务页面---获取服务人
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("ProductService/GetService_FlowPeople")
    rx.Observable<ServicePeopleEntity> getServicePeople(@FieldMap Map<String, String> map);

    /**
     * 编辑服务页面---完成编辑
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("ProductService/OrderSerive_EditTime")
    rx.Observable<ServiceRedactAlterEntity> getAlterResult(@FieldMap Map<String, String> map);

    /**
     * 获取服务图片列表
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("Project/GetConstructMaterials")
    rx.Observable<ServiceImageEntity> getConstructMaterials(@FieldMap Map<String, String> map);

    /**
     * 上传材料图片
     */
    String submitConstructMaterisal = "Project/SubmitConstructMaterisal";

    /**
     * 批量删除服务图片
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("ProductService/deleteService_image")
    rx.Observable<ServiceImageDeleteEntity> deleteService_image(@FieldMap Map<String, String> map);

    /**
     * 获取异常说明列表
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("Project/GetExceptionSpecificationByFlow")
    rx.Observable<ServiceUnusualEntity> getExceptionSpecificationByFlow(@FieldMap Map<String, String> map);

    /**
     * 上传异常说明
     */
    String submitExceptionDescriptionImg = "Project/SubmitExceptionDescriptionImg";

    /**
     * 删除异常说明
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("Project/DeleteExceptionSpecifcation")
    rx.Observable<UnusualDeleteEntity> deleteExceptionSpecifcation(@FieldMap Map<String, String> map);

    /**
     * 获取异常说明详情
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("Project/GetExceptionSpecifcationByDetai")
    rx.Observable<UnusualDetailEntity> getExceptionSpecifcationByDetai(@FieldMap Map<String, String> map);


    /**
     * 获取服务消息
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("Project/SearchUserGetNotifyMessage")
    rx.Observable<ServiceMessageEntity> searchUserGetNotifyMessage(@FieldMap Map<String, String> map);

    /**
     * 获取通知消息
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("ProductService/GetService_Notes")
    rx.Observable<InformMessageEntity> getService_Notes(@FieldMap Map<String, String> map);

    /**
     * 设置服务消息为已读
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("Project/TagPushMessageToRecRead")
    rx.Observable<TagServiceMessageEntity> tagPushMessageToRecRead(@FieldMap Map<String, String> map);

    /**
     * 设置通知消息为已读或删除通知消息
     * <p>
     * *"ID":消息ID,
     * *"modelType":消息类型，固定值为两个传一个 "UserMessage"=用户订单消息，"UserComplaint"客诉单消息
     * *"notesMethoh":处理方式，固定值为两个传一个 "read"=设置为已读,"delete"=设置为删除
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("ProductService/SetServicr_NotesStatsus")
    rx.Observable<TagInformMessageEntity> setServicr_NotesStatsus(@FieldMap Map<String, String> map);


    /**
     * 修改用户密码
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("ProductService/updateUserPassword")
    rx.Observable<ChangePWEntity> updateUserPassword(@FieldMap Map<String, String> map);

    /**
     * 订单详情
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("Order/SelectUserOrderDetail")
    rx.Observable<OrderDetailEntity> orderDetail(@FieldMap Map<String, String> map);

    /**
     * 订单跟踪
     *
     * @param map
     * @return
     */
    @FormUrlEncoded
    @POST("order/OrderTrackingStatus")
    rx.Observable<OrderTrackEntity> orderTrack(@FieldMap Map<String, String> map);
}
